{template 'common/header-base'}
<div data-skin="default" class="skin-default {if $_GPC['main-lg']} main-lg-body {/if}">
{php $frames = buildframes(FRAME);_calc_current_frames($frames);}
<div class="head">
	<nav class="navbar navbar-default" role="navigation">
		<div class="container {if !empty($frames['section']['platform_module_menu']['plugin_menu'])}plugin-head{/if}">
			<div class="navbar-header">
				<a class="navbar-brand" href="{$_W['siteroot']}">
					<img src="{if !empty($_W['setting']['copyright']['blogo'])}{php echo tomedia($_W['setting']['copyright']['blogo'])}{else}./resource/images/logo/logo.png{/if}" class="pull-left" width="110px" height="35px">
					<span class="version">{IMS_VERSION}</span>
				</a>
			</div>
			{if !empty($_W['uid'])}
			<div class="collapse navbar-collapse">
				<ul class="nav navbar-nav navbar-left">
					{php global $top_nav}
					{loop $top_nav $nav}
					<li{if FRAME == $nav['name']} class="active"{/if}><a href="{if empty($nav['url'])}{php echo url('home/welcome/' . $nav['name']);}{else}{$nav['url']}{/if}" {if !empty($nav['blank'])}target="_blank"{/if}>{$nav['title']}</a></li>
					{/loop}
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<li class="dropdown">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user color-gray"></i>{$_W['user']['username']} <span class="caret"></span></a>
						<ul class="dropdown-menu color-gray" role="menu">
							<li>
								<a href="{url 'user/profile'}" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
							</li>
							{if $_W['isfounder']}
							<li class="divider"></li>
							<li><a href="{url 'cloud/upgrade'}" target="_blank"><i class="wi wi-update color-gray"></i> 自动更新</a></li>
							<li><a href="{url 'system/updatecache'}" target="_blank"><i class="wi wi-cache color-gray"></i> 更新缓存</a></li>
							<li class="divider"></li>
							{/if}
							<li>
								<a href="{url 'user/logout'}"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
							</li>
						</ul>
					</li>
				</ul>
			</div>
			{else}
			<div class="collapse navbar-collapse">
				<ul class="nav navbar-nav navbar-right">
					<li class="dropdown"><a href="{php echo url('user/register');}">注册</a></li>
					<li class="dropdown"><a href="{php echo url('user/login');}">登陆</a></li>
				</ul>
			</div>
			{/if}
		</div>
	</nav>
</div>
{if empty($_COOKIE['check_setmeal']) && !empty($_W['account']['endtime']) && ($_W['account']['endtime'] - TIMESTAMP < (6*86400))} 
<div class="system-tips we7-body-alert" id="setmeal-tips">
	<div class="container text-right">
		<div class="alert-info">
			<a href="{if $_W['isfounder']}{php echo url('user/edit', array('uid' => $_W['account']['uid']));}{else}javascript:void(0);{/if}">
				您的服务有效期限：{php echo date('Y-m-d', $_W['account']['starttime']);} ~ {php echo date('Y-m-d', $_W['account']['endtime']);}.
				{if $_W['account']['endtime'] < TIMESTAMP}
				目前已到期，请联系管理员续费
				{else}
				将在{php echo floor(($_W['account']['endtime'] - strtotime(date('Y-m-d')))/86400);}天后到期，请及时付费
				{/if}
			</a>
			<span class="tips-close" onclick="check_setmeal_hide();"><i class="wi wi-error-sign"></i></span>
		</div>
	</div>
</div>
<script>
	function check_setmeal_hide() {
		util.cookie.set('check_setmeal', 1, 1800);
		$('#setmeal-tips').hide();
		return false;
	}
</script>
{/if} 
<div class="main">
{if !defined('IN_MESSAGE')}
<div class="container">
	{if in_array(FRAME, array('account', 'system', 'wxapp', 'site', 'website')) && !in_array($_GPC['a'], array('news-show', 'notice-show'))}
		<a href="javascript:;" class="js-big-main button-to-big color-gray" title="加宽">{if $_GPC['main-lg']}正常{else}宽屏{/if}</a>
	<div class="panel panel-content main-panel-content {if !empty($frames['section']['platform_module_menu']['plugin_menu'])}panel-content-plugin{/if}">
		<div class="content-head panel-heading main-panel-heading">
			{if FRAME == 'website'}
				<span class="font-lg"><i class="wi wi-system-site"></i> 设置教程</span>
				<span class="pull-right"><a href="{php echo url('website/wenda-show/list')}" class="color-default we7-margin-left"><i class="wi wi-cut color-default"></i>教程列表</a></span>

			{/if}
		</div>
	<div class="panel-body clearfix main-panel-body {if !empty($_W['setting']['copyright']['leftmenufixed'])}menu-fixed{/if}">
		<div class="left-menu">
			<div class="left-menu-content">
				<div class="panel panel-menu">
					<div class="panel-heading">
						<span class="no-collapse">基础设置教程<i class="wi wi-appsetting pull-right setting"></i></span>
					</div>
					<ul class="list-group">
						<li class="list-group-item list-group-more">
								<a href="{php echo url('website/wenda-show/list', array('cateid' => 2));}"><span class="label label-more">点击进入</span></a>
						</li>
					</ul>
				</div>
				<div class="panel panel-menu">
					<div class="panel-heading">
						<span class="no-collapse">小程序应用教程<i class="wi wi-appsetting pull-right setting"></i></span>
					</div>
					<ul class="list-group">
						{loop $wxapps $wxapp}
							<li class="list-group-item {if $wxapp['active']}active{/if}">
								<a href="{$wxapp['url']}" class="text-over">
								{$wxapp['title']}
								</a>
							</li>
						{/loop}
						<li class="list-group-item list-group-more">
								<a href="{php echo url('website/wenda-show/list', array('cateid' => 3));}"><span class="label label-more">点击进入</span></a>
						</li>
					</ul>
				</div>
				<div class="panel panel-menu">
					<div class="panel-heading">
						<span class="no-collapse">公众号应用教程<i class="wi wi-appsetting pull-right setting"></i></span>
					</div>
					<ul class="list-group">
						{loop $modules $module}
							<li class="list-group-item {if $modid == $module['mid']}active{/if}">
								<a href="{php echo url('website/wenda-show/list', array('cateid' => 1, 'modid' => $module['mid']));}" class="text-over">
								{$module['title']}
								</a>
							</li>
						{/loop}
					</ul>
				</div>
			</div>
			</div>
		<div class="right-content">
	{/if}
{/if}
